home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / docs / linux-do / programm / lpg-0.4 / lpg-0 / LPG / ioctl.tex < prev    next >
LaTeX Document  |  1995-03-25  |  1.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Corel 10 Texture (image/corel10Texture) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried x-fmt/111 Plain Text File default
100% detectItEasy Format: Plain text[LF] default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 61 75 74 68 6f 72 20 | 7b 53 76 65 6e 20 47 6f |\author |{Sven Go|
|00000010| 6c 64 74 7d 0a 5c 74 69 | 74 6c 65 20 7b 54 68 65 |ldt}.\ti|tle {The|
|00000020| 20 4c 69 6e 75 78 20 50 | 72 6f 67 72 61 6d 6d 65 | Linux P|rogramme|
|00000030| 72 27 73 20 47 75 69 64 | 65 7d 0a 0a 5c 63 68 61 |r's Guid|e}..\cha|
|00000040| 70 74 65 72 20 7b 54 68 | 65 20 60 60 73 77 69 73 |pter {Th|e ``swis|
|00000050| 73 20 61 72 6d 79 20 6b | 6e 69 66 65 27 27 20 69 |s army k|nife'' i|
|00000060| 6f 63 74 6c 7d 0a 0a 69 | 6f 63 74 6c 20 73 74 61 |octl}..i|octl sta|
|00000070| 6e 64 73 20 66 6f 72 20 | 69 6e 70 75 74 2f 6f 75 |nds for |input/ou|
|00000080| 74 70 75 74 20 63 6f 6e | 74 72 6f 6c 20 61 6e 64 |tput con|trol and|
|00000090| 20 69 73 20 75 73 65 64 | 20 74 6f 20 6d 61 6e 69 | is used| to mani|
|000000a0| 70 75 6c 61 74 65 20 61 | 0a 63 68 61 72 61 63 74 |pulate a|.charact|
|000000b0| 65 72 20 64 65 76 69 63 | 65 20 76 69 61 20 61 20 |er devic|e via a |
|000000c0| 66 69 6c 65 64 65 73 63 | 72 69 70 74 6f 72 2e 20 |filedesc|riptor. |
|000000d0| 54 68 65 20 66 6f 72 6d | 61 74 20 6f 66 20 69 6f |The form|at of io|
|000000e0| 63 74 6c 20 69 73 5c 5c | 0a 7b 5c 69 74 20 69 6f |ctl is\\|.{\it io|
|000000f0| 63 74 6c 28 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 |ctl(unsi|gned int|
|00000100| 20 66 64 2c 20 75 6e 73 | 69 67 6e 65 64 20 69 6e | fd, uns|igned in|
|00000110| 74 20 72 65 71 75 65 73 | 74 2c 20 75 6e 73 69 67 |t reques|t, unsig|
|00000120| 6e 65 64 20 6c 6f 6e 67 | 20 61 72 67 75 6d 65 6e |ned long| argumen|
|00000130| 74 29 7d 2e 5c 5c 0a 54 | 68 65 20 72 65 74 75 72 |t)}.\\.T|he retur|
|00000140| 6e 20 76 61 6c 75 65 20 | 69 73 20 2d 31 20 69 66 |n value |is -1 if|
|00000150| 20 61 6e 20 65 72 72 6f | 72 20 6f 63 63 75 72 65 | an erro|r occure|
|00000160| 64 20 61 6e 64 20 61 20 | 76 61 6c 75 65 20 67 72 |d and a |value gr|
|00000170| 65 61 74 65 72 20 6f 72 | 0a 65 71 75 61 6c 20 74 |eater or|.equal t|
|00000180| 68 61 6e 20 30 20 69 66 | 20 74 68 65 20 72 65 71 |han 0 if| the req|
|00000190| 75 65 73 74 20 73 75 63 | 63 65 65 64 65 64 20 6a |uest suc|ceeded j|
|000001a0| 75 73 74 20 6c 69 6b 65 | 20 6f 74 68 65 72 20 73 |ust like| other s|
|000001b0| 79 73 74 65 6d 20 63 61 | 6c 6c 73 2e 0a 54 68 65 |ystem ca|lls..The|
|000001c0| 20 6b 65 72 6e 65 6c 20 | 64 69 73 74 69 6e 67 75 | kernel |distingu|
|000001d0| 69 73 68 65 73 20 73 70 | 65 63 69 61 6c 20 61 6e |ishes sp|ecial an|
|000001e0| 64 20 72 65 67 75 6c 61 | 72 20 66 69 6c 65 73 2e |d regula|r files.|
|000001f0| 0a 53 70 65 63 69 61 6c | 20 66 69 6c 65 73 20 61 |.Special| files a|
|00000200| 72 65 20 6d 61 69 6e 6c | 79 20 66 6f 75 6e 64 20 |re mainl|y found |
|00000210| 69 6e 20 2f 64 65 76 20 | 61 6e 64 20 2f 70 72 6f |in /dev |and /pro|
|00000220| 63 2e 20 54 68 65 79 20 | 64 69 66 66 65 72 20 66 |c. They |differ f|
|00000230| 72 6f 6d 0a 72 65 67 75 | 6c 61 72 20 66 69 6c 65 |rom.regu|lar file|
|00000240| 73 20 69 6e 20 74 68 61 | 74 20 77 61 79 20 74 68 |s in tha|t way th|
|00000250| 61 74 20 74 68 65 79 20 | 68 69 64 65 20 61 6e 20 |at they |hide an |
|00000260| 69 6e 74 65 72 66 61 63 | 65 20 74 6f 20 61 20 64 |interfac|e to a d|
|00000270| 72 69 76 65 72 0a 61 6e | 64 20 6e 6f 74 20 74 6f |river.an|d not to|
|00000280| 20 61 20 72 65 61 6c 20 | 28 72 65 67 75 6c 61 72 | a real |(regular|
|00000290| 29 20 66 69 6c 65 20 74 | 68 61 74 20 63 6f 6e 74 |) file t|hat cont|
|000002a0| 61 69 6e 73 20 74 65 78 | 74 20 6f 72 20 62 69 6e |ains tex|t or bin|
|000002b0| 61 72 79 20 64 61 74 61 | 2e 0a 54 68 69 73 20 69 |ary data|..This i|
|000002c0| 73 20 74 68 65 20 55 4e | 49 58 20 70 68 69 6c 6f |s the UN|IX philo|
|000002d0| 73 6f 70 68 79 20 61 6e | 64 20 61 6c 6c 6f 77 73 |sophy an|d allows|
|000002e0| 20 74 6f 20 75 73 65 20 | 6e 6f 72 6d 61 6c 20 72 | to use |normal r|
|000002f0| 65 61 64 2f 77 72 69 74 | 65 0a 6f 70 65 72 61 74 |ead/writ|e.operat|
|00000300| 69 6f 6e 73 20 6f 6e 20 | 65 76 65 72 79 20 66 69 |ions on |every fi|
|00000310| 6c 65 2e 20 42 75 74 20 | 69 66 20 79 6f 75 20 6e |le. But |if you n|
|00000320| 65 65 64 20 74 6f 20 64 | 6f 20 6d 6f 72 65 20 77 |eed to d|o more w|
|00000330| 69 74 68 20 61 20 73 70 | 65 63 69 61 6c 0a 66 69 |ith a sp|ecial.fi|
|00000340| 6c 65 20 6f 72 20 61 20 | 72 65 67 75 6c 61 72 20 |le or a |regular |
|00000350| 66 69 6c 65 20 79 6f 75 | 20 63 61 6e 20 64 6f 20 |file you| can do |
|00000360| 69 74 20 77 69 74 68 20 | 2e 2e 2e 20 79 65 73 2c |it with |... yes,|
|00000370| 20 69 6f 63 74 6c 2e 20 | 59 6f 75 20 6d 6f 72 65 | ioctl. |You more|
|00000380| 0a 6f 66 74 65 6e 20 6e | 65 65 64 20 69 6f 63 74 |.often n|eed ioct|
|00000390| 6c 20 66 6f 72 20 73 70 | 65 63 69 61 6c 20 66 69 |l for sp|ecial fi|
|000003a0| 6c 65 73 20 74 68 61 6e | 20 66 6f 72 20 72 65 67 |les than| for reg|
|000003b0| 75 6c 61 72 20 66 69 6c | 65 73 2c 20 62 75 74 20 |ular fil|es, but |
|000003c0| 69 74 27 73 0a 70 6f 73 | 73 69 62 6c 65 20 74 6f |it's.pos|sible to|
|000003d0| 20 75 73 65 20 69 6f 63 | 74 6c 20 6f 6e 20 72 65 | use ioc|tl on re|
|000003e0| 67 75 6c 61 72 20 66 69 | 6c 65 73 20 61 73 20 77 |gular fi|les as w|
|000003f0| 65 6c 6c 2e 0a 0a 0a 5c | 65 6e 64 69 6e 70 75 74 |ell....\|endinput|
|00000400| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+